Type.registerNamespace('ModWatch');

ModWatch.CustomAlert = function(element) { 
    ModWatch.CustomAlert.initializeBase(this, [element]);

	this._clientNotifyFunction = null;
}

ModWatch.CustomAlert.prototype =
{

	get_clientNotifyFunction : function()
	{
		return this._clientNotifyFunction;
	},

	set_clientNotifyFunction : function(value)
	{
		this._clientNotifyFunction = value;
	},

	showAlert : function(sender, e)
	{
		if (!this._clientNotifyFunction)
			return;
		if (typeof this._clientNotifyFunction != 'function')
			return;

		var args = new ModWatch.CustomAlertEventArgs(sender);
		this._clientNotifyFunction(this, args);
		if (args.get_cancel())
			e.set_cancel(true);
	}

}

ModWatch.CustomAlert.registerClass('ModWatch.CustomAlert', ModWatch.AlertBehaviorBase);

if (typeof(Sys) !== 'undefined') Sys.Application.notifyScriptLoaded();
